<!DOCTYPE html>
<html>
  <!--
  Copyright (c) 2013 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
  -->
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="origin-trial" content="AnnZaSfBggcmPxgNMYPXgW7tVBy3HoIkgSysHge4o7QT7U/n3Sr89HvKuJwNtPxgZ9Z/cs6TzbUy6F+glrMQngIAAABZeyJvcmlnaW4iOiJodHRwczovL2dvbmF0aXZlY2xpZW50LmFwcHNwb3QuY29tOjQ0MyIsImZlYXR1cmUiOiJQTmFDbCIsImV4cGlyeSI6MTU3NTQxNzU5OX0=">

    <title>Lua Interpreter</title>

    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,700">
    <link href="/static/css/out/site.css" rel="stylesheet">

    <script type="text/javascript" src="//storage.googleapis.com/gonacl/demos/publish/234230_dev/lua/hterm.concat.js"></script>
    <script type="text/javascript" src="naclterm.js"></script>
    <script type="text/javascript" src="lua.js"></script>

  </head>

  <body class="demo">

    <header>
      <h1>Lua Interpreter</h1>
    </header>

    <section>
      <div class="intro">
        <p>
          This demo provides a client-side interactive shell for the <a
            href="http://www.lua.org/" target="_blank">Lua</a> programming
          language.
        </p>
        <p class="note">
          Note: the C++ source code of this demo is available in <a
          href="https://chromium.googlesource.com/webports/+/main/ports/lua/README.nacl"
          target="_blank">webports</a>.  The terminal interface is
          rendered in HTML/CSS using the
          <a href="https://github.com/libapps-mirror/libapps" target="_blank">hterm</a> library.
        </p>
        <div class="panel panel-info">
          <h2>Run in Lua</h2>
          <div class="panel-body">
            <button type="button" id="shell">Interactive Shell</button>
            <button type="button" id="unittests">Lua Unit Tests</button>
            <button type="button" id="scimark">SciMark</button>
            <button type="button" id="binarytrees">Binarytrees</button>
          </div>
          <h2>Paste Snippets</h2>
          <div class="panel-body">
            <button type="button" id="mandlebrot">Mandlebrot Ascii</button>
            <button type="button" id="fibonacci">Fibonacci</button>
            <button type="button" id="donut">Donut</button>
            <button type="button" id="banner">Banner</button>
          </div>
        </div>

        <p class="credit">
          <b>Links:</b>
          </br>
          Unit Testss:
          <a href="http://www.lua.org/tests/5.2/" target="_blank">Lua Unit Tests</a>
          <br/>
          Benchmarks:
          <a href="http://luajit.org/download/scimark.lua" target="_blank">SciMark</a>,
          <a href="http://kripken.github.io/lua.vm.js/binarytrees.lua" target="_blank">binarytrees</a>
          <br/>
          Snippets:
          <a href="http://people.sc.fsu.edu/~%20jburkardt/c_src/mandelbrot_ascii/mandelbrot_ascii.html" target="_blank">Mandlebrot Ascii</a>,
          <a href="http://www.a1k0n.net/2011/07/20/donut-math.html" target="_blank">Donut</a>
        </p>

      </div>

      <div class="Demo-body">

      <div id="listener" class="Demo-content">
        <div id="terminal"></div>
      </div>
    </div>

    <div id="loading-cover">
      <div id="message">
        <div id="statusField"></div>
        <div id="progress" class="progress progress-striped active">
          <div id="progress-bar" class="progress-bar"  role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
          </div>
        </div>
      </div>
    </div>
  </section>

</body>
</html>
